package org.seckill.dao;

import org.apache.ibatis.annotations.Param;
import org.seckill.entity.SuccessKilled;

/**
 * Created by 追风少年
 *
 * @email doubihah@foxmail.com
 * @create 2017-05-30 22:19
 **/
public interface SuccessKilledDao {

    /**
     * 插入购买明细,可过滤重复
     * @param seckillId
     * @param userPhone
     * @return 如果影响行数>=1 表示插入更新的记录行数
     */
    int insertSuccessKilled(@Param("seckillId") Long seckillId,@Param("userPhone") String userPhone);

    /**
     * 根据ID查询SuccessKilled并携带秒杀产品对象实体
     * @param seckillId
     * @param userPhone
     * @return
     */
    SuccessKilled queryByIdAndUserPhoneWithSeckill(@Param("seckillId") Long seckillId,@Param("userPhone") String userPhone);



}
